Image pickup apparatus that performs automatic focus control and control method for the image pickup apparatus

ABSTRACT

An image pickup apparatus that can efficiently obtain an offset between focal positions detected in phase difference-based focus detection and contrast-based focus detection by using results of phase difference-based focus detection at multiple points. Focal positions in a plurality of regions based on a pair of image signals obtained from different pupils are obtained. A focal position for a focus lens at which a contrast of image signals for image pickup is at a peak is detected. A target focal position is determined from the plurality of focal positions. When another focal position is present between a present focal position and the target focal position, an offset between a focal position of the focus lens at which the contrast detected at the other focal position while the focus lens is moving is at a peak and the other focal position is calculated.

TECHNICAL FIELD

The present invention relates to an image pickup apparatus such as adigital camera, and in particular to an image pickup apparatus thatperforms automatic focus (AF) control, and a control method for theimage pickup apparatus.

BACKGROUND ART

Conventionally, image pickup apparatuses such as compact digital camerasperform contrast-based focus detection using an image pickup device.Contrast-based focus detection enables accurate automatic focus controlusing image signals output from an image pickup device. For this reason,it has been proposed that in digital single-lens reflex cameras, aftermirror lock-up after phase difference-based focus detection,contrast-based focus detection is performed in the same focus detectionarea.

As described above, contrast-based focus detection enables more accurateautomatic focus control than in phase difference-based focus detection.A reason that can be given for this is that in contrast-based focusdetection, outputs from an image pickup device are used, whereas inphase difference-based focus detection, focus adjustment units are ondifferent optical paths, and aberration resulting from mechanicaloptical-path difference and different pupils is corrected for.

FIG. 6 is a diagram useful in explaining an operation in a case wherefocus control is performed in a selected focus detection area. In thefigure, the abscissa indicates the camera-to-subject distance, and aftermirror lock-up after a selected subject is focused on by an AF unit in amirror-down state, focus scan is performed before and after a focalposition so as to detect a contrast peak. In the figure, the arrow Aindicates a movement of a lens, a face at a position indicated by thearrow B is a target focal position, and the waveform C indicates a peakof contrast evaluation values (PTL (Patent Literature) 1).

Also, there has been proposed the technique that part of pixels of animage pickup device are provided with different optical characteristicsfrom those of other pixels and used for focus detection so as todispense with a secondary optical system for conventional focusdetection (PTL (Patent Literature) 2).

CITATION LIST

Patent Literature

{PTL 1} Japanese Laid-Open Patent Publication (Kokai) No. 2006-350188

{PTL 2} Japanese Patent Publication No. 3592147

SUMMARY OF INVENTION Technical Problem

In PTL 1 and PTL described above, however, when focus detection isperformed in a plurality of areas, that is, at multiple points,unselected focus detection results obtained outside a focus detectionarea are not effectively used for focus control. Moreover, when focuscontrol is performed so as to bring a plurality of subjects close toeach other into a depth of field, there may be a case where there is nosubject at a target focal position, and contrast-based focus detectioncannot be performed, or it is necessary to perform contrast-based focusdetection with respect to each of the plurality of subjects.

The present invention provides an image pickup apparatus and a controlmethod for the image pickup apparatus that can efficiently obtain anoffset between focal positions obtained in phase difference-based focusdetection and contrast-based focus detection by using results of phasedifference-based focus detection at multiple points.

Solution to Problem

Accordingly, in a first aspect of the present invention, there isprovided an image pickup apparatus comprising an image pickup devicecomprising an image pickup pixel group and a focus detection pixelgroup, a first focus detection unit that obtains focal positions in aplurality of regions based on a pair of image signals obtained fromdifferent pupils by the focus detection pixel group, a second focusdetection unit that detects a focal position for a focus lens at which acontrast of image signals from the image pickup pixel group is at apeak, a determination unit that determines a target focal position fromthe plurality of focal positions obtained by the first focus detectionunit, and a calculation unit that, when another focal position detectedby the first focus detection unit is present between a present focalposition and the target focal position, calculates an offset between afocal position of the focus lens at which the contrast detected at theother focal position by the second focus detection unit while the focuslens is moving is at a peak and the other focal position.

Accordingly, in a second aspect of the present invention, there isprovided a control method for an image pickup apparatus comprising animage pickup device having an image pickup pixel group, and a focusdetection pixel group, comprising a first focus detection step ofobtaining focal positions in a plurality of regions based on a pair ofimage signals obtained from different pupils by the focus detectionpixel group, a second focus detection step of detecting a focal positionfor a focus lens at which a contrast of image signals from the imagepickup pixel group is at a peak, a first determination step ofdetermining a target focal position from the plurality of focalpositions obtained in the first focus detection step, a seconddetermination step of determining whether another focal position ispresent between a present focal position and the target focal position,and a calculation step of, when it is determined in the seconddetermination step that the other focal position is present, calculatinga focal position offset based on a focal position obtained based on thecontrast peak position detected at the other focal position in thesecond focus detection step while the focus lens is moving and a focalposition obtained from an amount of defocus in the first focus detectionstep.

Advantageous Effects of Invention

According to the present invention, an offset between focal positionsobtained in phase difference-based focus detection and contrast-basedfocus detection can be efficiently obtained by using results of phasedifference-based focus detection at multiple points.

The features and advantages of the invention will become more apparentfrom the following detailed description taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram useful explaining an exemplary schematicarrangement of an image pickup apparatus given as an embodiment of thepresent invention.

FIGS. 2A and 2B are flowcharts useful in explaining exemplary automaticfocus control in the image pickup apparatus.

FIG. 3 is a view showing an exemplary layout of focal positions inrespective nine AF regions displayed on a display unit.

FIGS. 4A to 4C are views useful in explaining a target focal positiondetermination process.

FIGS. 5A to 5C are views useful in explaining the target focal positiondetermination process.

FIG. 6 is a view useful in explaining an operation in a case where focuscontrol is performed only in a selected focus detection area accordingto a prior art.

FIG. 7 is a diagram showing an exemplary pixel arrangement of an imagepickup device including focus detection sensors in specific rows.

FIG. 8 is a diagram schematically showing a structure of a focusdetection sensor S1.

FIG. 9 is a diagram schematically showing a structure of a focusdetection sensor S2.

FIGS. 10A and 10B are views useful in explaining phase shift of imagesdue to focus shift.

DESCRIPTION OF EMBODIMENTS

An embodiment of the present invention will now be described in detailwith reference to the drawings.

FIG. 1 is a block diagram useful explaining an exemplary schematicarrangement of an image pickup apparatus given as an embodiment of thepresent invention.

Referring to FIG. 1, the image pickup apparatus 100 according to thepresent embodiment has a focus lens 101 for focusing on a subject, alens control unit 102 that controls a focal position for the focus lens101, and a diaphragm 103 that controls an amount of incident light. Theimage pickup apparatus 100 also has an image pickup device 104 comprisedof a CMOS, a CCD, or the like.

The image pickup device 104 has an image pickup pixel group 105, a focusdetection pixel group 106, and a pupil dividing optical system 107.

The image pickup pixel group 105 has a plurality of pixels having R, G,and B color filters provided on a light-receiving surface thereof andused to obtain image signals for image pickup. The focus detection pixelgroup 106 has a plurality of pairs of focus detection sensors (see FIGS.7 to 10B) that are in a plurality of focus detection regions, disposedsymmetrically with respect to an optical axis, and have differentoptical characteristics. The field of view of the focus detection pixelgroup 106 is limited by light-shielding layers 503 and 603 (see FIGS. 8and 9). The pupil dividing optical system 107 limits incident rays oflight so that a pupil can be divided symmetrically with respect to anoptical axis for a pair of focus detection sensors of the focusdetection pixel group 106.

More specifically, at least one pair of focus detection sensors aredisposed in part of pixels of the image pickup device 104. FIG. 7 is adiagram showing an exemplary pixel arrangement of the image pickupdevice including focus detection sensors in specific rows. Referring toFIG. 7, symbols R, G, and B designate pixels having a red filter, agreen filter, and a blue filter, respectively, disposed on an incidentplane of the image pickup device to which rays of light enter. SymbolsS1 and S2 designate focus detection sensors, which have differentoptical characteristics.

FIG. 8 is a diagram schematically showing a structure of the focusdetection sensor S1. Referring to FIG. 8, the focus detection sensor S1has a micro lens 501, a smooth layer 502, the light-shielding layer 503,and a photoelectric conversion element 504. The micro lens 501 isdisposed at the top, and the smooth layer 502 constitutes a flat surfaceforming the micro lens 501. The light-shielding layer 503 has anaperture 503 a decentered to one side relative to a center of aphotoelectric conversion area of a pixel, and has a function of reducingincident rays of light.

FIG. 9 is a diagram schematically showing a structure of the focusdetection sensor S2. Referring to FIG. 9, the focus detection sensor S2has a micro lens 601, a smooth layer 602, the light-shielding layer 603,and a photoelectric conversion element 604 similar to the focusdetection sensor S1. The focus detection sensor S2 differs from thefocus detection sensor S1 in that an aperture 603 a of thelight-shielding layer 603 is decentered to the other side relative to acenter of a photoelectric conversion area of a pixel.

Referring to FIG. 7, a row including the focus detection sensors S1 anda row including the focus detection sensors S2 are disposed in proximityto each other, and they form substantially the same image signals. Whensubject light is in focus on pixels via an image pickup optical system,an image signal from the row including the focus detection sensors S1and an image signal from the row including the focus detection sensorsS2 match each other.

In a case where subject light is out of focus, a phase difference arisesbetween an image signal from the row including the focus detectionsensors S1 and an image signal from the row including the focusdetection sensors S2. Directions of the phase difference in a frontfocus state and in a rear focus state are opposite to each other.

When viewing the image pickup optical system from the focus detectionsensor S1 and from the focus detection sensor S2, a pupil looks dividedsymmetrically with respect to an optical center.

FIGS. 10A and 10B are views useful in explaining phase shift of imagesdue to focus shift. In FIGS. 10A and 10B, portions corresponding to thefocus detection sensors S1 and the focus detection sensors S2 appearingin FIG. 7 are designated by symbols A and B, respectively, and for theconvenience of explanation, RGB pixels for image pickup are not shown,and the focus detection sensors are arranged side by side.

Light from a specific point on a subject is divided into a bundle ofrays (ΦLa) entering a portion A through a pupil corresponding to theportion A and a bundle of rays (ΦLb) entering a portion B through apupil corresponding to the portion B. Because these two bundles of raysare from the same one point, they reach one point on the same micro lensas long as the image pickup optical system is in focus on the imagepickup device (FIG. 10A). However, for example, when the focus of theimage pickup optical system is x before the image pickup device, the twobundles of rays are shifted by a change in an angle of incidence of therays (FIG. 10B), and when the focus of the image pickup optical systemis x behind the image pickup device, the two bundles of rays are shiftedin the reverse direction.

Thus, when the image pickup optical system is in focus, an image signalformed in a row of A and an image signal formed in a row of B match eachother, and when the image pickup optical system is out of focus, animage signal formed in a row of A and an image signal formed in a row ofB do not match each other.

The image pickup apparatus 100 according to the present embodiment alsohas a focus detection unit 108, a contract detection unit 109, a pixelinterpolation unit 110, an image processing unit 111, a display unit112, a recording unit 113, an operation unit 114, and a camera controlunit 115.

The focus detection unit 108 detects a focal position by calculating anamount of image shift between pixel rows of a pair of focus detectionsensors S1 and S2 in the focus detection pixel group 106 by performing acorrelation computation. The contrast detection unit 109 outputscontrast evaluation values using image signals from the image pickuppixel group 105. The pixel interpolation unit 110 interpolates imagedata for image pickup, which corresponds to positions of pixels in thefocus detection pixel group 106, from a near pixel group.

The image processing unit 111 performs gamma correction, white-balanceadjustment, re-sampling, predetermined image compression coding on imagesignals output from the image pickup pixel group 105. The display unit112 displays image data output from the image processing unit 111, andthe recording unit 113 records image data output from the imageprocessing unit 111. The operation unit 114 receives operation inputs bya user. The camera control unit 115 controls the overall operation ofthe image pickup apparatus 100, and for example, controls the lenscontrol unit 102 to move a lens, and carries out contrast-based AF inaccordance with an output from the contrast detection unit 109.

Referring next to FIGS. 2A and 2B, a description will be given ofexemplary automatic focus control in the image pickup apparatus 100according to the present embodiment. Each process in FIGS. 22A and 2B isexecuted by a CPU of the camera control unit 115 or the like inaccordance with a program stored in a ROM, an HDD, or the like, notshown, and loaded into a RAM.

In step S11, the camera control unit 115 reads signals from the focusdetection pixel group 106, and proceeds to step S12.

In the step S12, the camera control unit 115 causes the focus detectionunit 108 to perform a correlation computation on two image signalsobtained from different pupils by a pair of the focus detection sensorsS1 and S2 of the focus detection pixel group 106 as described above withreference to FIGS. 10A and 10B. As a result, the camera control unit 115obtains focal positions, and proceeds to step S13.

On this occasion, for example, the camera control unit 115 displaysfocal positions in respective nine AF regions on the display unit 112 asshown in FIG. 3. In the example shown in FIG. 3, there are human facesat the upper left, center, and right middle, and focal positions thereofare obtained.

In the step S13, the camera control unit 115 determines a target focalposition based on information on the focal positions in the plurality ofAF regions obtained in the step S12, and proceeds to step S14.

Referring now to FIGS. 4A to 4C, a description will be given of a targetfocal position determination process. FIGS. 4A to 4C show exemplarythree patterns of positional relationships between three persons beingpresent in a screen, in which the abscissa indicates thecamera-to-subject distance, the left indicates the infinite distance,and the right indicates the minimum subject distance. Also, the arrow Aindicates a movement of the focus lens 101, a face at position indicatedby the arrow B is a target focal position, and the waveform C indicatesa peak of contrast evaluation values.

Referring to FIG. 4A, because three persons are substantially equaldistances away from each other, it is determined that they are unrelatedpersons, and the closest person or the person positioned in the middleis determined as a target focal position. In this example, the closestperson is selected.

Referring to FIG. 4B, because three persons are relatively close to eachother, it can be determined that this is a group photograph, and in thiscase, a position at which focal positions of all the three persons areinside the depth of field is determined as a target focal position.

Referring to FIG. 4C, because two persons are close to each other, it isdetermined that they are related persons, and because the other oneperson is away from the two persons, it is determined that he/she is anunrelated person. In this case, a position at which the two personsclose to each other are inside the depth of field is determined as atarget focal position.

In the step S14, the camera control unit 115 determines whether or notanother focal position Dm is present between a present focal position Dnand a target focal position Dt, and when the focal position Dm ispresent, the camera control unit 115 proceeds to step S19, and when thefocal position Dm is not present, the camera control unit 115 proceedsto step S15.

In the step S19, the camera control unit 115 causes the lens controlunit 102 to move the focus lens 101 along the optical axis and shift thefocal position, and proceeds to step S20.

In the step S20, the camera control unit 115 causes the contrastdetection unit 109 to obtain a peak position of the subject at the focalposition Dm being present while the focal lens 101 is moving, andobtains a focal position Dmc by interpolating the peak position, andproceeds to step S21.

In the step S21, the camera control unit 115 reads signals from thefocus detection pixel group 106 at the focal position Dm, and causes thefocus detection unit 108 to obtain again a focal position Dmp of thesubject in a manner similar to the above described manner, and thenproceeds to step S22. The focal positions obtained in the step S20 andthe step S21 have only to be in the vicinity of the focal position Dmbeing present between the present focal position Dn and the target focalposition Dt. Also, in the step S21, the focal position Dmp is obtainedfrom the amount of defocus in phase difference-based AF.

In the step S22, the camera control unit 115 causes the focus detectionunit 108 to obtain a focal position Dt′ of the subject again before thetarget focal position Dt in a manner similar to the above describedmanner, and then proceeds to step S23. Because the value of the focalposition Dt′ is obtained in the vicinity of the target focus positionDt, accuracy can be further improved.

In the step S23 the camera control unit 115 calculates an offset fromthe focal positions Dmc and Dmp obtained in the step S20 and the stepS21, corrects the focal position Dt′ obtained in the step S22 to obtaina focal position Dt″, and then proceeds to step S24.

In the step S24, the camera control unit 115 controls the lens controlunit 102 to stop moving the focus lens 101 at the focal position Dt″obtained in the step S23, and terminates the process. It should be notedthat the processes in the steps S22 and the step S23 may be repeated apredetermined number of times between the step S21 and the step S24. Theoperation in the steps S19 to S24 corresponds to FIGS. 4A, 4C, and 5B.

On the other hand, in the step S15, the camera control unit 115 causesthe lens control unit 102 to move the focus lens 101 along the opticalaxis and move the focal position, and proceeds to step S16.

In the step S16, the camera control unit 115 obtains a focal position Dcby detecting a peak position from an output from the contrast detectionunit 109 at the target focal position Dt, and proceeds to step S17.

In the step S17, the camera control unit 115 causes the lens controlunit 102 to reverse the moving direction of the focus lens 101, andproceeds to step S18.

In the step S18, the camera control unit 115 causes the lens controlunit 102 to stop moving the focus lens 101 at the focal position Dcobtained in the step S16, and terminates the process. It should be notedthat the operation in the steps S15 to S18 corresponds to FIGS. 4B, 5A,and 5C. FIGS. 4B and 5C show a state in which a target focal position isset so that a plurality of subjects can be inside the depth of field,but control is provided by obtaining an offset from one subject.

As described above, according to the present embodiment, a target focalposition is determined using results of phase difference-based AF atmultiple points, contrast-based AF is performed in a region where asubject is present while the lens is moving, and a focal position offsetis obtained. Thus, focus control for detecting a peak position at atarget focal position can be dispensed with, and the time to reverse thelens moving direction after detection of a peak can be saved. As aresult, an offset between a focal position in phase difference-based AFand a focal position in contrast-based AF can be efficiently obtained byusing results of phase difference-based AF at multiple points.

Moreover, even in a case where contrast-based AF cannot be performed ata target focal position when a plurality of subjects being at differentdistances are controlled into the depth of field, a focal position inthe vicinity of the target focal position is used, and hence focuscontrol can be performed with high accuracy.

It should be noted that the present invention is not limited to theembodiment described above, but various changes in or to the abovedescribed embodiment may be possible without departing from the spiritsof the present invention.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

REFERENCE SIGNS LIST

-   100 Image pickup apparatus-   101 Focus lens-   102 Lens control unit-   105 Image pickup pixel group-   106 Focus detection pixel group-   107 Pupil dividing optical system-   108 Focus detection unit-   109 Contrast detection unit-   110 Pixel interpolation unit-   111 Image processing unit-   115 Camera control unit

The invention claimed is:
 1. An image pickup apparatus comprising: an image pickup device comprising an image pickup pixel group and a focus detection pixel group; a first focus detector that obtains focal positions in a plurality of regions based on a pair of image signals obtained from different pupils by the focus detection pixel group; a second focus detector that detects a focal position for a focus lens at which a contrast of image signals from the image pickup pixel group is at a peak; a determination processor that determines a target focal position from the plurality of focal positions obtained by said first focus detector unit; and a calculation processor that, when another focal position detected by said first focus detector is present between a present focal position and the target focal position, calculates an offset between a focal position of the focus lens at which the contrast detected at the other focal position by said second focus detector while the focus lens is moving is at a peak and the other focal position.
 2. An image pickup apparatus according to claim 1, further comprising a correction processor that, based on the offset between the focal positions calculated by said calculation processor, corrects the focal position obtained by said first focus detector in a vicinity of the target focal position.
 3. An image pickup apparatus according to claim 1, wherein when no other focal position is present between a present focal position and the target focal position, said second focus detector detects a position of the focus lens at which a contrast of image signals from the image pickup pixel group is at a peak in a vicinity of the target focal position.
 4. A control method for an image pickup apparatus comprising an image pickup device having an image pickup pixel group, and a focus detection pixel group, comprising: obtaining focal positions in a plurality of regions based on a pair of image signals obtained from different pupils by the focus detection pixel group; detecting a focal position for a focus lens at which a contrast of image signals from the image pickup pixel group is at a peak; determining a target focal position from the plurality of focal positions obtained in said step of obtaining focal positions; determining whether another focal position is present between a present focal position and the target focal position; and when it is determined that the other focal position is present, calculating a focal position offset based on a focal position obtained based on the contrast peak position detected at the other focal position in said step of detecting a focal position for a focus lens while the focus lens is moving and a focal position obtained from an amount of defocus in said step of obtaining focal positions. 